package com.github.interview.model;

import javax.validation.constraints.*;
import java.util.Date;

/**
 * use validate to check the elements
 */
public class EquityTransaction {
    private Integer txId;

    @NotNull
    @Min(1)
    private Integer tradeId;

    @NotNull
    @Min(1)
    private Integer version;

    @NotBlank
    private String securityCode;

    @NotNull
    @Min(1)
    private Integer quantity;

    @NotNull
    @Min(1)
    @Max(3)
    private Integer optType;

    @NotNull
    @Min(1)
    @Max(2)
    private Integer tradeType;

    private Date createTime;

    private Date modifyTime;

    public Integer getTxId() {
        return txId;
    }

    public void setTxId(Integer txId) {
        this.txId = txId;
    }

    public Integer getTradeId() {
        return tradeId;
    }

    public void setTradeId(Integer tradeId) {
        this.tradeId = tradeId;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public String getSecurityCode() {
        return securityCode;
    }

    public void setSecurityCode(String securityCode) {
        this.securityCode = securityCode;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public Integer getOptType() {
        return optType;
    }

    public void setOptType(Integer optType) {
        this.optType = optType;
    }

    public Integer getTradeType() {
        return tradeType;
    }

    public void setTradeType(Integer tradeType) {
        this.tradeType = tradeType;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }
}